﻿/**
 * ...
 * @author ...
 */

package hails.html;

class ViewTool 
{

	public function new() 
	{
		
	}
	
	public static var callBacks = { 
		linkTo : _linkTo
	};
	
	public static function link(path:String, content:String) : String {
		return "<a href='" + path + "'>" + content + "</a>";
	}
	
	public static function pathTo(controller:String, action:String) : String {
		return "/index.php/" + controller + "/" + action;
	}
	
	public static function linkTo(controller:String, action:String, content:String) : String {
		return link(pathTo(controller, action), content);
	}
	
	public static function _linkTo( resolve : String -> Dynamic, controller:String, action:String, content:String ) {
		return linkTo(controller, action, content);
	} 
	
	
}